package com.qfedu.springmvc.controller;

import com.qfedu.springmvc.entity.User;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
@RequestMapping("/ajax")
public class AjaxController {

    @RequestMapping(value = "test1",produces = "application/json;charset=utf-8")
    @ResponseBody
    public User test1(@RequestBody User user){
        System.out.println(user);
        return user;
    }
}
